PROJECT(ClusterVirtualisation)
cmake_minimum_required(VERSION 2.4)
if(COMMAND cmake_policy)
	cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

SET(CMAKE_VERBOSE_MAKEFILE OFF)




SET(OLD_SIMGRID_HOME "$ENV{SIMGRID_HOME}")
IF(OLD_SIMGRID_HOME)
ELSE(OLD_SIMGRID_HOME)
	FIND_PATH("include/xbt/queue.h" OLD_SIMGRID_HOME)
ENDIF(OLD_SIMGRID_HOME)
IF(OLD_SIMGRID_HOME)
	INCLUDE_DIRECTORIES("${OLD_SIMGRID_HOME}/include")
	LINK_DIRECTORIES("${OLD_SIMGRID_HOME}/lib")
ELSE(OLD_SIMGRID_HOME)
	MESSAGE(FATAL_ERROR "SimGrid(http://simgrid.gforge.inria.fr/) Not found.")
ENDIF(OLD_SIMGRID_HOME)

#SET(SIMBATCH_HOME "$ENV{SIMBATCH_HOME}")		
#IF(SIMBATCH_HOME)
#	INCLUDE_DIRECTORIES("${SIMBATCH_HOME}/include")
#	LINK_DIRECTORIES("${SIMBATCH_HOME}/lib"})
#ELSE(SIMBATCH_HOME)
#	MESSAGE(FATAL_ERROR "SIMBATCH_HOME environnement variable NOT SET")
#ENDIF(SIMBATCH_HOME)








# Declare/Compile libraries
INCLUDE_DIRECTORIES(libs)


SUBDIRS(libs)
SUBDIRS(batch_scheduler)

# Compile tests
#SUBDIRS(tests)

# Compile grid-schedulers
#SUBDIRS(grid-schedulers)

# Generate the documentation
# FIND_PATH(DOXYGEN_DIR doxygen)
# IF (DOXYGEN_DIR)
#     MESSAGE(STATUS "Generating the documentation with doxygen")
#     EXEC_PROGRAM("${DOXYGEN_DIR}/doxygen Doxyfile")
# ELSE (DOXYGEN_DIR)
#     MESSAGE(STATUS "doxygen not found, The documentation will not be generated")
# ENDIF (DOXYGEN_DIR)

# Graphviz dot
#FIND_PATH(DOT_DIR dot)
#IF (DOT_DIR)
#    MESSAGE(STATUS "dot (Graphviz) found: ${DOT_DIR}/dot")
#ELSE (DOT_DIR)
#    MESSAGE(FATAL_ERROR "dot (Graphviz) not found")
#ENDIF (DOT_DIR)



